package meta

import "git.oschina.net/fuxiaohei/fuxiaohei-go.git/Core"

type Home struct {

}

func (this Home) Setup() {
	Core.SetTemplateFunc("Meta", MetaString)
}

func MetaString(key string) string {
	sql := Core.Sql("fuxiaohei_metas", "value").Where("key = ?").Select()
	data := Core.Db.One(sql, key)
	if len(data) < 1 {
		return ""
	}
	return data["value"]
}

